<template>
<!-- 首页搜索框组件 -->
    <div class="header">
            <van-search placeholder="休闲鞋" class="search" right-icon @search="onSearch" />
            <span class="login" @click="goLogin">登录</span>
    </div>
</template>

<script>
export default {
    data() {
        return {
        };
    },
    methods: {
        goLogin() {
            this.$router.push({ path: "login" });
        },
        onSearch() {
            this.$router.push({ path: "aftersearch" });
        },
    },
};
</script>
<style scoped >
/* 搜索框 */
.header {
    overflow: hidden;
    border-bottom: 1px solid #f9f9fa;
}
.search {
    padding: 0.24rem 0.213333rem 0.186667rem 0.4rem;
    float: left;
    width: 8.533333rem;
}

.login {
    float: right;
    text-align: center;
    line-height: 1.253333rem;
    margin-right: 0.313333rem;
    color: #ff5733;
}
.header .van-icon .van-icon-search {
    color: #ff5733;
}
</style>

